#!/bin/bash
FILE=$1
while read LINE; do
	f=$LINE
	f="${f#http://}"
	f="${f#https://}"
	f=${f%%/*}
	f="${f%:*}"
	sep=","
    ip=$(dig $f +short) 
	echo $ip >> ./ips/$2-$3-ips.csv
	echo $ip$sep$LINE >> ./location-ips-server-mapping/$2-$3.csv
done < $FILE

